-- GENERATED SPELL FOR [Orc Necrolyte] --


function spell0_21747(pUnit, Event) --@Shadow Mend,Heal--
pUnit:FullCastSpellOnTarget(37456,pUnit)
pUnit:RegisterEvent('Sorts_21747', 0, 1)
end

function spell1_21747(pUnit, Event) --@Shadow Spear,n/a--
pUnit:FullCastSpellOnTarget(37461,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21747', 0, 1)
end

function Sorts_21747(pUnit, Event)
local choix_sorts_21747 = math.random(0, 1)
if choix_sorts_21747 == 0 then
pUnit:RegisterEvent('spell0_21747', 1, 1)
end
if choix_sorts_21747 == 1 then
pUnit:RegisterEvent('spell1_21747', 1, 1)
end
end

function mob21747_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21747', math.random(1500, 3000), 1)
end

function mob21747_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21747_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21747_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21747, 1, 'mob21747_Action')
RegisterUnitEvent(21747, 2, 'mob21747_Leave')
RegisterUnitEvent(21747, 3, 'mob21747_Kill')
RegisterUnitEvent(21747, 4, 'mob21747_Die')
